package cn.itsource.org.controller;

import cn.itsource.org.domain.Employee;
import cn.itsource.org.query.BaseQuey;
import cn.itsource.org.service.Employeeservice;
import cn.itsource.org.util.JSONResult;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/emp")
public class EmplyeeController {

    @Autowired
    Employeeservice employeeservice;
    /**
        *1.请求方式: Get
        *2.url:
        *3.请求参数:无
        *4.响应参数:
        **/
    @GetMapping("/findAll")
    public JSONResult findAll(){
        List<Employee> list = employeeservice.findAll();
        return JSONResult.success(list);

    }
    @PostMapping("findPage")
    public JSONResult findPage(@RequestBody BaseQuey baseQuey){


        return JSONResult.success();
    }
    @GetMapping("findtree")
    public JSONResult findtree(){

        return JSONResult.success();
    }
}
